package com.shensi.api.admin.client.station;

import com.shensi.api.admin.client.fallback.monitor.SysLogininforClientFallBack;
import com.shensi.api.admin.domian.station.dto.CardBatchDto;
import com.shensi.api.admin.domian.station.dto.PhysicalCardDto;
import com.shensi.api.admin.domian.station.dto.PhysicalCardListDto;
import com.shensi.api.admin.domian.station.dto.PhysicalCardSecretKeyDto;
import com.shensi.api.admin.domian.station.dto.WxMessageTemplateForm;
import com.shensi.api.admin.domian.station.dto.WxMessageTemplateQueryForm;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.page.TableDataInfo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = SysLogininforClientFallBack.class)
@Component
public interface PhysicalCardClient {

    /**
     * 查询单个卡信息
     * */
    @GetMapping("/physicalCard/get")
    public AjaxResult getByNo(@RequestParam("physicalCardNo") String physicalCardNo);

    /**
     * 新增实体卡  复制实体卡
     * */
    @PostMapping("/physicalCard/add")
    public AjaxResult addPhysicalCard(@RequestBody PhysicalCardDto physicalCard);

    /**查询实体卡列表*/
    @GetMapping("/physicalCard/list")
    public TableDataInfo getPhysicalCardList(@SpringQueryMap PhysicalCardListDto physicalCardDto);

    /**修改覆盖实体卡  不允许修改面额充值*/
    @PostMapping("/physicalCard/update")
    public AjaxResult updatePhysicalCard(@RequestBody PhysicalCardDto physicalCard);

    /** 批量修改实体卡状态为 冻结、注销状态*/
    @PostMapping("/physicalCard/update/status")
    public AjaxResult updatePhysicalCardStatus(@RequestBody List<PhysicalCardDto> physicalCardList);

    /**
     * 获取密钥
     * */
    @GetMapping("/physicalCard/getSecretKey")
    public AjaxResult getSecretKey();


    /**
     * 返回生产实体卡号
     * */
    @GetMapping("/physicalCard/createNo")
    public AjaxResult createNo();

    /**
     * 生成批次号的时候，空卡已经生成
     *
     */
    @PostMapping("/physicalCard/batch/save")
    public AjaxResult addCardBatch(@RequestBody CardBatchDto cardBatch);

    @PostMapping("/physicalCard/batch/list")
    public TableDataInfo selectCardBatchList(@RequestBody CardBatchDto cardBatch);

    @PostMapping("/physicalCard/batch/update")
    public AjaxResult updateCardBatch(@RequestBody CardBatchDto cardBatch);

    @GetMapping("/physicalCard/batch/delete")
    public AjaxResult deleteCardBatch(@RequestParam("id") Long id);

    /**
     * 导出卡号
     * */
    @GetMapping("/physicalCard/export/physicalCardNo")
    public AjaxResult exportPhysicalCardNo(@RequestParam("id") Long id);


    /**
     * 判断是否可以写卡
     * */
    @GetMapping("/physicalCard/judge/card")
    public AjaxResult judgeCard(@RequestParam("physicalCardNo") String physicalCardNo);

    /**
     * 查询 一批次中第一个未写卡成功的卡号
     * */
    @GetMapping("/physicalCard/batch/firstNum")
    public AjaxResult firstNumBatch(@RequestParam("id") Long id);
    /**
     * 注销列表
     * */
    @PostMapping("/physicalCard/card/withdraw/list")
    public TableDataInfo withdrawList(@RequestBody PhysicalCardListDto physicalCardListDto);


}
